package de.koller.balance.render.texture;

import de.koller.aframe.gl.ATexture;
import de.koller.oceanFramework.gl.util.ParticleTexture;
import org.lwjgl.opengl.GL11;

public class BGrid extends ATexture implements ATexture.ITextureBuilder {

	@Override
	protected void setUp( TextureParameters tparam ) {
		tparam.size = 32;
		tparam.builder = this;
		tparam.magFilter = GL11.GL_NEAREST;
	}

	@Override
	public void build( ParticleTexture texture ) {
		texture.clear( 0xff000000 );
		for( int i = 0; i < 32; i++ ) {
			texture.setPixel( 0xffffffff, 0, i );
			texture.setPixel( 0xffffffff, i, 0 );
			texture.setPixel( 0xffffffff, i, texture.getWidth() - 1 );
			texture.setPixel( 0xffffffff, texture.getHeight() - 1, i );
		}
	}
	
}
